Custom Collectors

This guide is only for expert users who want to implement their own collector. Custom collectors are created in ABAP.

Custom collectors enable you to create custom KPIs, which are collected according to the logic you defined in the custom collector. The instructions below explain how to create a custom collector with a custom KPI:

For more information about collectors in general, see the chapter Collectors.

Creating a Custom Collector with a Custom KPI

Step 1: Create a custom collector

  1. Go to the class builder by starting transaction SE24.

  2. Enter the class name /DVD/MON_CL_COL_TEMPLATE and select the Display option.

  3. In the toolbar, select the option Display object list (Ctrl+Shift+F5).

  4. Right-click the class /DVD/MON_CL_COL_TEMPLATE and select Copy (Ctrl+F5).

  5. In the field Copy, enter the name of your custom collector class starting with a capital Y* or Z*.

  6. In the screen for creating an object directory, select Local objects (F7).

  7. Display your class and activate it. 

Step 2: Add your custom collector to the CrystalBridge® Monitoring collector list

  1. Click Settings > Collector settings. Alternatively, you can start transaction /DVD/MON_COL.

  2. Click New Entries.

  3. Enter your custom collector name with its description. Leave the License key field empty.

Step 3: Define a custom KPI

Define the custom KPI as described in the chapter Defining a Custom KPI. After creating the KPI definition, return to this step to complete the creation of the custom collector. 

NOTE During the definition of a custom KPI, fill out the field KPI collector with the technical name of your created custom collector in the previous steps. 

Step 4: Implement the logic of your custom collector

  1. Start transaction SE24.

  2. Open your custom collector class in the class builder.

  3. Go to the method /DVD/MON_IF_COLLECTOR~COLLECT_DATA.

  4. Implement the method /DVD/MON_IF_COLLECTOR~COLLECT_DATA.

NOTE If you copy the class /DVD/MON_CL_COL_TEMPLATE, this method will include comments that will help you to identify which parts of the code are mandatory for the implementation of selected features of the custom collector. 

During the implementation of the calculation logic for a KPI, you can use the collector features below.

Features of a Custom Collector

Custom Collector Parameters (Optional) 

If you have set parameters for your custom collector, you can obtain the parameter values by using the collector method get_parameter().

Instead of MY_PARAMETER_NAME, use your own parameter name as defined for your custom collector. For more information about collector parameters, see the chapter Parameters of Collectors

Proceed as follows to create a parameter for a custom collector:

  1. Start transaction /DVD/MON and click Settings > Collector settings. Alternatively, you can start transaction /DVD/MON_COL.

  2. Select your custom collector name.

  3. Double-click Parameters.

  4. Click New Entries

  5. Enter your parameter name and its value.

  6. Click Save.

Input Table (Optional)

You can define input values for your collectors, which are sent from the central system to this collector. To obtain these inputs in your collector, you must use the collector method get_inputs().

Instead of /DVD/MON_TT_INPUT_TABLE, use your own created table for input values.

Detail Table (Optional)

You can define detail tables for your custom collector. Detail tables store additional information about collected KPIs.

 

Instead of /DVD/MON_OUTPUT_TABLE, use your own created detail table name. For more information about detail tables, see the chapter KPI Details Displayed in a Detail Table.

If you want to create your own detail table for your custom collector, see the chapter Creating a Detail Table for a Custom KPI Assigned to a Custom Collector.

KPI Values (Mandatory)

You must implement the logic of your custom KPI calculation in the collector. You can calculate and save multiple KPIs for one collector. To display the KPI values in CrystalBridge® Monitoring, you must save them for each KPI using the collector method add_kpi().

Instead of MY_KPI_01 and MY_KPI_02, use your own custom KPI names.

After you have finished and activated the implemented logic of your custom collector, the next step is to specify the monitoring profile of a KPI as described in the chapter Defining Monitoring Profiles for KPIs.

NOTE You can find an overview of the complete process of custom KPI creation in the chapter The Complete Process of Custom KPI Creation and Data Collection.